<template>
    <view>
        <view class="feedbackList">
            <view class="feedbackList-time">{{feedbackDetails.createTime}}</view>
            <view class="feedbackList-content">
                {{feedbackDetails.feedbackContent}}
            </view>
            <view class="feedBackImgList">
                <view v-for="(item, index) in feedBackImg" :key="index" class="feedBackImgItem">
                    <image :src="item" class="feedBackIcon"></image>
                </view>
            </view>
            <view class="reply-wrap" v-if="feedbackDetails.customerServiceReply">
                <text class="reply">客服回复:</text>
                <text class="reply-content"> {{feedbackDetails.customerServiceReply}}</text>
            </view>
        </view>
    </view>
</template>
<script>
import { getMyFeedbackDetails } from '../../../api/https'

export default {
    data() {
        return {
            feedBackImg: [
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                },
                {
                    image: '../../images/feedback.png'
                }
            ],
            feedbackDetails: {}
        }
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(option) {
        const { id } = option
        this.getMyFeedbackDetails(id)
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },
    methods: {
        getMyFeedbackDetails(id) {
            const that = this
            getMyFeedbackDetails(id).then((res) => {
                if (res.code == 0) {
                    that.setData({
                        feedbackDetails: res.data || [],
                        feedBackImg: res?.data?.imgList || []
                    })
                }
                console.log(res)
            })
        }
    }
}
</script>
<style lang="less">
@import url('./feedbackDetails.less');
</style>
